package mytest

import "fmt"

func ForFlow() {

	for i := 0; i < 10; i++ {
		fmt.Println(i)
	}

	data := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
	for i, v := range data {
		fmt.Println(i, v)
	}

	for i := 0; i < len(data); i++ {
		fmt.Println(i, data[i])
	}

	sum := 100
	for {
		sum += sum
		if sum > 1000 {
			break
		}
	}

	fmt.Println("sum = ", sum)

JLOOP:
	for j := 0; j < 5; j++ {
		for i := 0; i < 10; i++ {
			fmt.Println(i, j)
			if i > 5 {
				break JLOOP
			}
		}
	}

}
